public class Test {


    public static void main(String[] args) {

    }
    //布尔二叉树的遍历
    /*public boolean evaluateTree(TreeNode root) {
        if(root.left == null) return root.val == 1?true:false;
        boolean left = evaluateTree(root.left);
        boolean right = evaluateTree(root.right);
        if(root.val == 2) return left || right;
        else return left && right;
    }*/


    public double myPow(double x, int n) {
        return n>=0?pow(x,n):1.0/pow(x,-n);
    }
    public double pow(double x,int n) {
        if(n==0) return 1;
        double tmp = pow(x,n/2);
        return n%2==0?tmp*tmp:tmp*tmp*x;
    }
}
